Skip to content

Conversation

@nrspruit
Copy link
Contributor

@nrspruit nrspruit commented Dec 6, 2024

  • Fixes a race condition when the wait events are counting events when executing the context's synchronous immediate command list.
  • If a counting event is used in a non immediate command list, then an error will be returned.

@nrspruit nrspruit requested a review from a team as a code owner December 6, 2024 00:11
@nrspruit nrspruit added the v0.11.x Include in the v0.11.x release label Dec 6, 2024
@github-actions github-actions bot added the level-zero L0 adapter specific issues label Dec 6, 2024
@nrspruit nrspruit force-pushed the fix_inorder_initList branch from 6405c51 to 3467780 Compare December 6, 2024 00:25
@kbenzie kbenzie added the ready to merge Added to PR's which are ready to merge label Dec 9, 2024
ze_command_list_handle_t ZeCommandListForInit =
UrContext->ZeCommandListInit;
if (InOrderListRequired) {
ZeCommandListForInit = UrContext->ZeCommandListInitInOrder;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just create the correct type of cmdlist in the first place in UrContext->ZeCommandListInit? Will there ever be a situation where two different queues in a single context require different types of events (thus command lists)?

Copy link
Contributor Author

@nrspruit nrspruit Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the user can request an out of order queue so the envs would not be taken so we would have an out of order queue, then an in order immediate command list being used for init.

There is no "correct" in this case. They would be different in this case anyways.

If we want the init list to always be determined by the defaults of the two envs, then we can change this such that if the envs are set, then the init command list is also in order.

I was worried about the impact of performance for these calls, but if that is not a concern, then this can be made that way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pbalcer , please re-review, I decided to just simplify to the single list when both envs are set. that would then be a catch all. Less configurable to swap inbetween, but this is cleaner.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for making the changes!

@nrspruit nrspruit removed the ready to merge Added to PR's which are ready to merge label Dec 10, 2024
@nrspruit nrspruit force-pushed the fix_inorder_initList branch from 3467780 to a25acd3 Compare December 10, 2024 22:37
- Fixes a race condition when the wait events are counting events when
  executing the context's synchronous immediate command list.
- If a counting event is used in a non immediate command list, then an
  error will be returned.
- Given both InOrderLists and CounterBasedEvents is enabled, then the
  context init command list will not be inorder.

Signed-off-by: Neil R. Spruit <[email protected]>
@nrspruit nrspruit force-pushed the fix_inorder_initList branch from a25acd3 to 08acf05 Compare December 10, 2024 22:55
nrspruit added a commit to nrspruit/llvm that referenced this pull request Dec 10, 2024
@martygrant martygrant merged commit 45f3d8a into oneapi-src:main Dec 11, 2024
70 of 74 checks passed
martygrant added a commit to intel/llvm that referenced this pull request Dec 11, 2024
@martygrant martygrant added the ready to merge Added to PR's which are ready to merge label Dec 11, 2024
@martygrant
Copy link
Contributor

Created intel/llvm PR for this intel/llvm#16327

martygrant added a commit to intel/llvm that referenced this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level-zero L0 adapter specific issues ready to merge Added to PR's which are ready to merge v0.11.x Include in the v0.11.x release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants